<template>
  <div id="preferential">
    <div class="prefertitle">
      <div class="prefercenter">
        <img :src="preferinfo.levelimgicon">
        <h3>{{preferinfo.name}}</h3>
        <p>{{preferinfo.needlevel}}</p>
      </div>
    </div>
    <div class="prefercontent">
      <div class="prefericon"><img src="../assets/images/userlevel-prefer(1).png">会员等级</div>
      <div class="prefertxt">
        {{preferinfo.needlevel}}
      </div>
    </div>
    <div class="prefercontent">
      <div class="prefericon"><img src="../assets/images/userlevel-prefer(2).png">福利介绍</div>
      <div class="prefertxt">
        <p v-for="iil in preferinfo.preferentialtext">{{iil}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default{
  name: 'preferential',
  components: {
  },
  data () {
    return {
      levelinfo: '',
      preferinfo: ''
    }
  },
  created () {
    this.getObjDetail('./static/json/level/vippreferential.json').then((data) => {
      this.levelinfo = data.levelthemes[this.$route.query.pindex]
      this.preferinfo = this.levelinfo.preferential[this.$route.query.iindex]
    }, () => {})
  },
  methods: {
  }
}
</script>
<style lang="less">
#preferential{
  .prefertitle {
    padding: 30px 10px;
    background-image: url(../assets/images/mem-bg1.png);
    background-size: cover;
    background-repeat: no-repeat;
    .prefercenter {
      padding: 20px 10px;
      background-color: rgba(255, 255, 255, 0.5);
      border-radius: 5px;
      img {
        float: right;
        height: 3.4rem;
        margin-right: 10px;
      }
      h3 {
        color: @theme-color;
      }
      p {
        font-size: .8rem;
        color: #666666;
      }
    }
  }
  .prefercontent {
    padding: 20px 10px 10px;
    color: #999999;
    font-size: .8rem;
    .prefericon {
      font-size: 1rem;
      color: #404040;
      img {
        height: 20px;
        margin-right: 10px;
        position: relative;
        top: .4rem;
      }
    }
    .prefertxt {
      margin-top: 5px;
      margin-left: 30px;
      p {
        margin-bottom: 8px;
      }
    }
  }
}
</style>
